package com.five.welcome.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.five.welcome.entity.Dormitoryallocation;
import com.baomidou.mybatisplus.extension.service.IService;
import com.five.welcome.entity.statistic.RoomOfStudentCount;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ywt
 * @since 2024-07-12
 */
public interface DormitoryallocationService extends IService<Dormitoryallocation> {
    //获取全部宿舍信息
    List<Dormitoryallocation> getAll();
    //根据学号获取宿舍信息
    Dormitoryallocation getDormitoryBySNumber(String sNumber);
    //分配宿舍
    Map<String, Object> giveRoomBySNumber(String sNumber);
    //分页条件所有
    Page<Dormitoryallocation> getAllDormitoryPage(Integer pageNumber, Integer pageSize, String sNumber,
                                                  String sname, Integer buildingNumber, Integer dormitoryNumber);
    //统计各个宿舍楼的学生人数
    List<RoomOfStudentCount> RoomOfStudentCount();


    //添加刚刚注册的学生宿舍
    int addRoom(String sNumber,String sName);
    int selectRoom(String roomBuilding, String roomNumber, String bedNumber,String sNumber);
}
